package com.sychip.fhc.app.data.repo

import com.sychip.fhc.app.data.source.dto.WsnDeviceDto
import kotlinx.coroutines.flow.Flow

interface WsnDeviceRepo {
    fun getAllWsnDevices(usbId: String): Flow<List<WsnDeviceDto>>

    fun observeAllWsnDevices(usbId: String): Flow<List<WsnDeviceDto>>

    fun getWsnDevicesStream(usbId: String): Flow<List<WsnDeviceDto>>

    suspend fun getWsnDevices(usbId: String): List<WsnDeviceDto>

    fun getWsnDeviceStream(usbId: String, devId: String): Flow<WsnDeviceDto?>

    suspend fun getWsnDevice(usbId: String, devId: String): WsnDeviceDto?

    fun createWsnDevice(usbId: String, devId: String, devType: String, lastData: String, offsetX: Float  = 0f, offsetY: Float = 0f): Flow<WsnDeviceDto>

    suspend fun updateOffset(usbId: String, devId: String, offsetX: Float, offsetY: Float):WsnDeviceDto

    suspend fun updateLastData(usbId: String, devId: String, lastData: String):WsnDeviceDto

    suspend fun deleteAll(usbId: String)

    suspend fun deleteWsnDevice(usbId: String, devId: String):Int
}